﻿using CL.Dapper.Repository;
using CL.Enum.Common;
using CL.Game.Entity;
using Dapper;
using System.Collections.Generic;
using System.Data;
using System.Linq;

namespace CL.Game.DAL
{
    public class RechargeYearReportDAL : DataRepositoryBase<RechargeMonthReportEntity>
    {
        public RechargeYearReportDAL(DbConnectionEnum conenum, IDbConnection Db = null) : base(conenum, Db)
        {
        }

        /// <summary>
        /// 年度充值报表
        /// </summary>
        /// <param name="currentMonth"></param>
        /// <param name="payType"></param>
        /// <returns></returns>
        public List<RechargeMonthReportEntity> QueryExtendDAL(string currentMonth, string payType)
        {
            var Parms = new DynamicParameters();
            Parms.Add("@DateMonth", currentMonth);
            Parms.Add("@PayType", payType);
            return base.db.Query<RechargeMonthReportEntity>("udp_YearRechargeReport", Parms, null, true, null, CommandType.StoredProcedure).ToList();
        }

        /// <summary>
        /// 年度充值报表统计
        /// </summary>
        /// <param name="currentMonth"></param>
        /// <param name="payType"></param>
        /// <returns></returns>
        public List<RechargeMonthReportEntity> QueryExtendTJDAL(string currentMonth, string payType)
        {
            var Parms = new DynamicParameters();
            Parms.Add("@DateMonth", currentMonth);
            Parms.Add("@PayType", payType);
            return base.db.Query<RechargeMonthReportEntity>("udp_YearRechargeReportTJ", Parms, null, true, null, CommandType.StoredProcedure).ToList();
        }
    }
}
